Methods and systems for providing file data for a media file

ABSTRACT

A method of providing file data for a media file of a pre-determined format from a file system comprising a file record database and a data store, wherein the media file corresponds to a programme consisting of a plurality of segments, and wherein the segments included in the programme are dynamically determined. The method comprising the steps of receiving details of the programme including the duration of the programme, and determining the layout of the media file in the pre-determined format from the received details of the programme, the layout including locations for essence data within the file. A file record for the media file in the file record database is then created. In response to a request for the location of essence data within the file, a location given by determined layout of the media file is returned. Further, in response to an instruction that a segment is to be included in the programme, essence data corresponding to the contents of the segment is obtained. Then, in response to a request for a portion of essence data from the media file corresponding to a time period of the programme, essence data derived from the received essence data according to the determined layout of the media file is returned.

FIELD OF THE INVENTION

The present invention concerns methods and systems for providing filedata for a media file. More particularly, but not exclusively, theinvention concerns the generation of a media file for a programme insuch a way that essence data from the media file can be provided beforethe content of the entire programme has been finalised.

BACKGROUND OF THE INVENTION

Traditionally, digital media data has been distributed as a stream; forexample, video data may be distributed using a serial digital interface(SDI) standard for streaming data. A characteristic of a stream of datais that it provides sequential access to the data that makes it up, andonce a given piece of data has been provided by the stream, it cannot berequested again—the stream has no “memory”. The use of a stream totransmit media data is particularly appropriate where the media data isof a live event, such as a sporting or news event, in which case thepieces of data making up the stream only become available to betransmitted as they occur in real time.

It is usual for the content of a programme such as a news programme tobe dynamically determined as the programme is broadcast. A conventionalsystem for producing a news programme is shown in FIG. 1. A userinterface device 11 allows a user to control a running order 11 a forthe news programme. The running order 11 a is a sequence of segments,which may include live footage provided by cameras 13 a to 13 b (forexample of the news being read), and pre-recorded clips, advertisementbreaks and so on provided by data stores 12 a to 12 c. The userinterface 11 can be used to vary the running order as the programme isbroadcast, for example by rearranging, omitted, or added to the segmentsthat have not yet been broadcast as required to take account of eventsthat occur (such as newly breaking news stories, problems with livefootage and the like). The user interface 11 can also be used todirectly manipulate the display of footage via a jog/shuttle dial, asused for example when showing slow motion replays of important parts ofsports matches. The media data for the news programme is provided as astream 14.

However, while media data has traditionally been distributed as astream, it has become desirable to provide it as a file, for example asan MXF (Material eXchange Format) file, for reasons of cost andconvenience (amongst other things). A characteristic of a file is thatit allows random access; once a file is made available within a filesystem, a request may be made to the file system for any arbitrary pieceof data from anywhere within the file.

One example of the use of a file to transmit media data is thetransmission of a television programme over the Internet. This is nowdescribed with reference to FIG. 2. First, a file corresponding to aprogramme comprising segments S₁ to S_(n) is provided. The file is thenconverted into a file comprising converted segments S′₁ to S′_(n), whichis a file of a form suitable for transmitting over the Internet. Thismay for example involve transcoding the file into a different formatand/or quality. The conversion of the file is indicated by the bar C.

As noted above, the provision of the programme as a file means thatrandom access to any piece of data within the file may be required.Consequently, the conversion process C expects all segments S₁ to S_(n)of the file to be available within the file system prior to theconversion process beginning. Requiring the entire file to be availableintroduces a large time overhead for the availability of the convertedfile for transmitting over the Internet, as conversion can only beginonce the entire unconverted file is available, which consequently meansthat the programme the file represents must have finished. This is aparticular problem with programmes such as news programmes as describedabove, in which the running order for the programme can vary while theprogramme is being broadcast, meaning that the contents of the programmeis not fixed until it is broadcast, and so it not possible to obtain theunconverted file ahead of time.

One partial solution to reducing the time overhead is to reduce the timetaken by the conversion process C, by providing additional computingpower. However, even if the unlimited computing power were available,with the result that the time for conversion was effectively reduced tozero, the necessity to wait until the programme had finished would stillremain.

While random access to data from anywhere within a file is allowed, inorder to avoid the delay associated with waiting for the writing of afile to complete, file systems will commonly allow data to be read froma file while its content is still being written to the file system, eventhough this means that the entire file is not yet available. This arehowever two problems with this. First, if a request is made for datafrom the file that has not yet been written to the file system, the filesystem will return false data, for example blank padding data or garbagedata. Second, it is a characteristic of writing to a file in a filesystem that any part of the file can be written to. This means thatwhile the writing is in progress, data previously read from the file mayoverwritten. As a result, with known file systems it is not safe tobegin reading from a file before it has been completely written to thefile system, as until that has occurred any data read from the filecannot be trusted to be correct.

Specialised file formats are known which are intended to be read fromwhile still being written to. Such files consist of a series of segmentseach containing an index indicating where data can be found in thatsegment. Thus, if data is written to the file sequentially it can beread sequentially without later parts of the file needing to be referredto. However, the use of these requires that both the writing and thereading of the file occur in a well-behaved manner, which cannot berelied upon. Further, it would be advantageous to provide a solutionthat can be used with existing devices and the standard file formatsthey use.

Another solution is to modify the device that implements the conversionprocess so that it is able to accept streamed data rather than operatingupon a file. However, again it would be advantageous to provide asolution that can be used with existing devices and the standard fileformats they use.

The present invention seeks to mitigate the above-mentioned problems.Alternatively and/or additionally, the present invention seeks toprovide an improved file system that provides file data for a media filein a way that does not require the contents of the entire file to bedetermined before any file data can be provided.

SUMMARY OF THE INVENTION

In accordance with a first aspect of the present invention there isprovided a method of providing file data for a media file of apre-determined format from a file system comprising a file recorddatabase and a data store, wherein the media file corresponds to aprogramme consisting of a plurality of segments, and wherein thesegments included in the programme are dynamically determined, themethod comprising the steps of:

receiving details of the programme including the duration of theprogramme;

determining the layout of the media file in the pre-determined formatfrom the received details of the programme, the layout includinglocations for essence data within the file;

creating a file record in the file record database for the media file;

in response to a request for the location of essence data within thefile, returning a location given by determined layout of the media file;

in response to an instruction that a segment is to be included in theprogramme, obtaining essence data corresponding to the contents of thesegment;

in response to a request for a portion of essence data from the mediafile corresponding to a time period of the programme, returning essencedata derived from the received essence data according to the determinedlayout of the media file.

The file system is able to use the duration of the programme todetermine the layout of the media file, in particular the length of themedia file and how the data it will contain will be arranged. Thisenables the file system to create a file record for the media file, andto provide details of the location that essence data will have withinthe file even though that essence data has not yet been received. (Sofor example, if the pre-determined file format has an index indicatingthe location of essence data within the file, the file system couldcreate the index for the file in advance of the essence data beingavailable.) Then, as instructions are received indicating what segmentsthe programme is to contain, the file system is able to obtain therequired essence data and create and return the corresponding file datamaking up the media file, even though essence data for later segmentshas not yet been obtained, as the later segments are not yet known.

Notably, as the file system determines the layout of the file, and thenreceives the essence for use creating the contents of the media file,the file system maintains control over the contents of the file. This isin contrast to a conventional file system in which the file would bewritten to the file system, and the file system would simply receive thedata making up the file without having any control over (or knowledgeof) the internal structure of the file or what the data it is receivingrepresents, the order in which the data is received, or whether any datais re-written.

Thus, it can be seen that the file system appears to present an ordinaryfile in response to any request, allowing it to be used with existingdevices (such as transcoders). However, the file system is able toreliably return the contents of the media file when requested even if itdoes not yet have the essence data for generating subsequent contents.This is because the file is not being supplied via an ordinary filesystem write operation, i.e. from “outside” the file system, but ratherthe creation of the file from the essence data is done “inside” the filesystem using the stream of essence data, and is invisible to any devicereading the file. In this way, in contrast to conventional file systems,the entire media file does not need to be available before the data itcontains can begin to be read by another device.

Further, even though the content of the programme is dynamicallydetermined, advantageously the media data for the programme does notneed to be provided as a stream, so is simpler and cheaper. This alsohas the particular advantage that if the essence data for a segment isfully available, for example because the segment relates to apre-recorded clip rather than live footage, the corresponding file datafor the media file can be returned immediately and does need to wait tobe streamed.

The instructions regarding the segments to be included in the programmemay be provided by a user interface device. The user interface may allowa user to manipulate a running order for the programme. The userinterface device should allow a user to make changes only to segments inthe running order that have not yet been included in the programme,otherwise the running order will not match the contents of the programmeas broadcast.

The instructions regarding the segments to be included in the programmemay alternatively be provided automatically, for example by a softwareapplication. For example, the segments of a programme may be varied bychanging or removing all the advertisements within the programme,without user input during the broadcast of the programme.

The programme may be of a live event, for example a sporting or newsevent. The programme may be only part of a complete broadcast event (forexample only the first half of a football match), or may comprisemultiple broadcast events and may include idents, advertisements and thelike.

Preferably, the format of the media file requires that it comprise aplurality of segments of essence data located at pre-declared locationswithin the file, and wherein the determining of the layout of the mediafile comprises the steps of:

determining a maximum segment length for the file based on the requiredproperties of the media file;

in response to a request for the location of a segment within the file,returning a location calculated by considering each segment of the mediafile to have the maximum segment length;

in response to a request for essence data from a segment of the mediafile, returning generated essence data for the segment, wherein thegenerated essence data comprises the essence data derived from thereceived essence data and padding data to give the generated essencedata the maximum segment length.

This allows the layout of the media file with such a format to bedetermined before the essence data making up the file is available, andso before the byte length of essence data within each segment may beknown, as each segment has a predetermined length which does not dependupon the essence data it will contain. Each segment may correspond to asection of media of a predetermined duration. The maximum segment lengthmay be at least the maximum possible length of file data correspondingto a section of media of the pre-determined time duration. The maximumsegment length may be calculated by assuming a minimum possiblecompression of the file data making up a segment.

Preferably, the format of the media file is MXF. However, the format maybe any other suitable video format. While the invention is particularlyadvantageous when the format of the file is a compressed file format,for example MPEG-2 or MPEG-4 with intra-frame or GOP compression,fragmented MPEG-4, VC-1, Apple ProRes, etc., it is equally applicablewhen the format of the file is a non-compressed file format, for exampleQuicktime, uncompressed MPEG-4, AVI, WAV, etc.

Advantageously, the method further comprises the step of delaying thereturn of requested essence data to vary the speed with which essencedata is provided by the file system. This can help avoid an excessivedelay between a request for essence data from the media file being madeand the essence data being returned, helping to avoid the possibilitythat the request will time out.

Preferably, the requests for data are made by a software applicationthat requests essence data derived from the received essence datasequentially. A software application acting in such a manner enables thefile system to return essence data as the corresponding essence data isreceived via the stream, preventing excessive delays in responding torequests.

Advantageously, the method further comprises the step of studying thebehaviour of the software application to determine that it will requestthe essence data sequentially. This allows software applications thatare suitable for use with the file system to be identified.

Advantageously, the instruction that a segment be included in theprogramme includes the duration of the segment, and the generatedessence data for the segment is derived from the received essence databy omitting, duplicating and/or interpolating the frames of the receivedessence data. This means that, for example in the case that content ofthe segments are defined by a user using a jog/shuttle dial tomanipulate the display of footage, the derived essence data can begenerated efficiently form the obtained essence data. For example, ifthe manipulated footage contains multiple copies of the same frame, forexample because a portion in repeated or played in slow motion (in whichcase each frame is repeated one or more times in order to achieve theslow motion effect), then the required frames of essence data only needto be obtained once, in contrast to a conventional system in which astream of essence data in which the frames are repeated would beproduced.

In accordance with a second aspect of the invention there is provided afile system for providing file data for a media file of a pre-determinedformat, wherein the file system comprises a file record database and adata store, the media file corresponds to a programme consisting of aplurality of segments, and the segments included in the programme aredynamically determined, wherein the file system is arranged to:

receive details of the programme including the duration of theprogramme;

determine the layout of the media file in the pre-determined format fromthe received details of the programme, the layout including locationsfor essence data within the file;

create a file record in the file record database for the media file;

in response to a request for the location of essence data within thefile, return a location given by determined layout of the media file;

in response to an instruction that a segment is to be included in theprogramme, obtain essence data corresponding to the contents of thesegment;

in response to a request for a portion of essence data from the mediafile corresponding to a time period of the programme, return essencedata derived from the received essence data corresponding to the portionaccording to the determined layout of the media file.

Preferably, the format of the media file requires that it comprise aplurality of segments of file data located at pre-declared locationswithin the file, and wherein the file system is arranged, whendetermining of the layout of the media file, to:

determine a maximum segment length for the file based on the requiredproperties of the media file;

in response to a request for the location of a segment within the file,return a location calculated by considering each segment of the mediafile to have the maximum segment length;

in response to a request for file data from a segment of the media file,return generated file data for the segment, wherein the generated filedata comprises the file data derived from the received essence data andpadding data to give the generated file data the maximum segment length.

Preferably, the format of the media file is MPEG-4.

Advantageously, the file system is further arranged to delay the returnof earlier requested file data to vary the speed with which essence datais provided by the file system.

Advantageously, the instruction that a segment be included in theprogramme includes the duration of the segment, and the generatedessence data for the segment is derived from the received essence databy omitting, duplicating and/or interpolating the frames of the receivedessence data

In accordance with a third aspect of the invention there is provided acomputer network comprising:

a file system as described above;

a computer device arranged to request the media file from the filesystem;

wherein the computer device is arranged to request essence data derivedfrom the received essence data sequentially.

In accordance with a fourth aspect of the invention there is provided acomputer program product arranged, when executed, to perform the stepsof any of the methods described above.

In accordance with a fifth aspect of the invention there is provided acomputer program product arranged, when executed on a computing device,to provide a file system as described above.

It will of course be appreciated that features described in relation toone aspect of the present invention may be incorporated into otheraspects of the present invention. For example, the method of theinvention may incorporate any of the features described with referenceto the apparatus of the invention and vice versa.

DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention will now be described by way ofexample only with reference to the accompanying schematic drawings ofwhich:

FIG. 1 is a conventional system for determining the content of aprogramme as it is broadcast;

FIG. 2 is a diagram representing a conventional method of converting amedia file for transmittal over the Internet;

FIG. 3 is a system for determining the content of a programme as it isbroadcast in accordance with a first embodiment of the invention,including a file system for generating a media file corresponding to thebroadcast programme;

FIG. 4 is a flow chart showing the operation of the file system of FIG.3 when beginning the generation of the media file;

FIG. 5 shows the structure of the media file generated by the filesystem of FIG. 3;

FIG. 6 is a flow chart showing the operation of the file system of FIG.3 when generating the contents of the media file;

FIG. 7 is a flow chart showing the operation of the file system of FIG.3 in response to a request for the media file; and

FIG. 8 is a diagram representing the method of converting a media fileof the file system of FIG. 3.

DETAILED DESCRIPTION

A first embodiment of the invention is now described with reference toFIG. 3. A file system 31 comprises a data store 32, a file recorddatabase 33, and a gateway 34. The gateway 34 is arranged to receivestreamed essence data 37 (data constituting video and/or audioinformation). The file system 31 generates and allows to be read a mediafile for a programme such as a news programme, as described below. Thegateway 34 is in communication with a user interface device 36 forcontrolling the running order 36 a of the programme, in other words fordetermining the content of the programme while the programme is beingbroadcast.

The file system 31 is in communication via the gateway 34 with a network35. A device 38 running a “qualified” software application, as describedin detail later below, is in communication with the file system 31 viathe network 35.

FIG. 4 is a flow chart showing the operation of the file system 31 whenbeginning creation of the media file for the programme. Initially,before broadcast of the programme begins, the file system 31 willreceive details regarding the programme and the file to be produced,including for example the length of the programme, and the quality andformat of the file to be generated (step 41).

The file system 31 then uses this information to determine the structureof the file to be generated (step 42). An example file structure isshown in FIG. 5. The file structure 50 is for an MXF file, and comprisesan index 51, and a plurality of GOPs (“groups of pictures”) 52 a, 52 b,52 c to 52 d. A GOP is a series of images making up a particularsequence of video of a particular duration. The details received includethe length of the programme, allowing the number of GOPs and theduration of video within them to be determined.

The images in a GOP are compressed, which would usually result in theGOPs being of different lengths (i.e. being made up of a differentnumber of bytes). One reason for this is that the video a GOP representswill compress to a different size depending on the nature of the imagesmaking up the video; for example, as compression techniques includeidentifying the differences between images in a series, a series of verysimilar images will generally be compressed to a much smaller size thana series of images in which differ substantially from each other. Thismeans that in general, the location of a GOP in a file will depend onthe size of each preceding GOP, and the index 51 provides a mapping fromtime ranges of video to byte ranges in the file 40, thus allowing theGOP (or GOPs) corresponding to a particular time range of video to befound.

However, it can be seen from FIG. 5 that in the file structure 50 theGOPs 52 a to 52 d are all of the same size. This is achieved by havingthe file system 31 predetermine a size for each GOP. (It is important tonote that the contents of the GOPs is not yet known, and so the exactsize of the compressed essence data each GOP will contain cannot bedetermined.) The size of each GOP is determined by calculating theminimum possible compression, and so maximum possible byte range, of theimages making up the GOPs. The actual size of each GOP in the structureis then taken to be at least this maximum possible size.

The file system 31 then generates a file record for the file and storesit in the file record database 33 (step 43). The file record willcontain certain details about the file such, as its size, obtained fromthe structure of the file determined in the previous step. The index 51for the file is then generated (step 44), again using the determinedstructure of the file and in particular using the predetermined sizes ofthe GOPs 52 a to 52 d.

File structures for other file formats may also be determined in ananalogous manner, for example file in fragmented MPEG-4 format whichcomprise both an index at the beginning and a footer at the end for usein locating data within the file. Other file formats that may be usedinclude compressed file formats such as MPEG-2 or MPEG-4 withintra-frame or GOP compression, VC-1, Apple ProRes, etc., andnon-compressed file formats such Quicktime, uncompressed MPEG-4, AVI,WAV, etc.

The creation of the file data making up the media file while theprogramme is being broadcast, i.e. the creation of the contents of theGOPs, is now described with reference to FIG. 6. The content of theprogramme is controlled by a user via the user interface device 61.Throughout the programme, the user will control which segment in therunning order is to become part of the programme. For example, the usermay instruct that the current segment should be live footage.Alternatively, the user may instruct that the current segment should bea pre-recorded piece of media.

In both cases, this results in an instruction from the user interfacedevice 36 to the file system 31 that that particular segment has beencommitted to being in the programme (step 61). The user is of coursefree to change future items in the running order 36 a, but it can beseen that it is not possible to change the current segment (other thanto stop it at the point at which it has so far been broadcast so thatthe broadcast of another segment can begin) or to change any precedingsegments, as they have already become part of the broadcast programme.

Once the file system 31 has received the instruction as to the segmentthat has been committed, it obtains the necessary essence data for thatsegment (step 62). In the case that the segment comprises live footage,the essence data will be obtained via the stream 37. In contrast, in thecase that the segment is a pre-recorded piece of media, the requiredessence data will be obtained from wherever it is stored; the essencedata may be stored in the data store 32, or can be obtained from remotestorage via the network 35 for example. In the case that a jog/shuttledial is used to manipulate the display of footage, the required framesof essence data are obtained. If the manipulated footage containsmultiple copies of the same frame, for example because a portion inrepeated or played in slow motion (in which case each frame is repeatedone or more times in order to achieve the slow motion effect), then itcan be seen that the frames of essence data in any case only need to beobtained once, in contrast to a conventional system in which a stream ofessence data in which the frames are repeated would be produced.

The file system 31 then uses the essence data to generate the contentsof the GOPs (step 63), with the data being compressed and distributedbetween the GOPs according to the predetermined structure of the file.As discussed above, the length of any GOP is determined to be at leastthe minimum possible compression of the images in a GOP. Of course, inpractice the images will in the vast majority of cases compress to lessthan the minimum possible size, and in this case the free space within aGOP is filled with blank padding data.

The process is then repeated, as further segments are committed by theuser until the entire programme has been broadcast (steps 61 to 63repeated).

In the above embodiment the index of the file and the contents of theGOPs are generated as soon as it is possible to do so, in other wordsthe index is generated when the details of the file and programme arereceived, and the GOP contents are generated as soon as the requiredessence data is obtained. However, in alternative advantageousembodiments the index and GOP contents are generated only when required,for example the index may be generated only when the file is actuallyrequested, and the GOP contents may be generated only when requested.Any required essence data, for example that provided by the stream 37,may in the meantime be stored in the data store 32.

The operation of the file system 31 in response to a request for thefile for the programme from the device 38 is now described. As notedabove, the device 38 is running a “qualified” software application. Aqualified software application is a software application that has beenidentified as accessing the data constituting a file in a particularpredictable and well-behaved manner, as now described.

As discussed above, a characteristic of a file system is that it allowsrandom access to a file, in other words any arbitrary data from the filecan be requested. However, the inventor(s) have identified that certainsoftware applications do not take advantage of the random access thefile system provides, but rather access data from a file in apredictable manner. Any software application that is identified asreading the data from the file in a well-behaved manner that is suitablefor the present invention is considered to be “qualified”.

For the present invention, a software application is qualified if itonly accesses data from the file that corresponds to essence datasequentially, meaning that the software application does not try toaccess data from the file corresponding to later essence data out ofsequence. So, for example, a software application that transcoded a file(e.g. to convert it into a format and quality suitable for transmittingover the Internet) by initially accessing the index for the file, andsubsequently reading the contents of the GOPs in order from thebeginning to the end of the file, would be qualified. (It is noted thatthe index need not be located at the beginning of the file, and could belocated at the end or there could be indexes at both the beginning andend, for example.) However, a software application need not be sowell-behaved in order to be qualified; an application could read orre-read the index or any GOP already read at any time, or even read GOPdata from the end of the file as long as that GOP data could be providedwithout requiring corresponding essence data for its generation. (So anapplication that was satisfied by being provided generic padding datafrom the end of a file could be qualified, for example.) It is importantto note that what matters is not that the application reads the filedata from the whole file in order, and in fact it is common for a fileindex to be located at the end of a file in which case it would beexpected that the file data corresponding to that would be read first.What is required is that the application does not “jump ahead” by tryingto read essence data stored later in the file out of turn.

It will be appreciated that transcoding is only one example of softwareapplication functionality that may result in a software applicationbeing qualified, and the invention equally applies to access by aqualified software application with any function.

In a similar fashion, any device, software service or the like may beidentified as accessing a file in a well-behaved manner that allows itto be considered to be a qualified device, qualified software service,etc.

The operation of the file system 31 in response to requests for datafrom the qualified software application 37 is now described withreference to FIG. 7. Initially, the file system 31 will receive arequest to read a file (step 71). In response, the file system 31returns a file handle linked to the file record for the file that wasstored in the file record database 33 (step 72).

Next, as the software application running on the device 38 behaves in awell-behaved manner as described above, the file system 31 will receivea request for data from the file corresponding to the index of the file(step 73), which the file system 31 returns to the device 38 (step 74).It can be seen that this can be provided before any of the essence datafor the file has been obtained. This is because the location of the GOPswithin the file is predetermined by based on their maximum possiblesize, allowing the index to be generated before the essence data makingup the GOPs is known. This is again unlike conventional systems in whichthe location of any GOP is dependent upon the compression possible forany preceding GOP, and so the index can only be generated once all GOPshave been generated, requiring all essence data to be available.

Next, the file system 31 will receive a request for data making up a GOP(step 75), which it returns (step 76). Again, because the softwareapplication running on the device 38 behaves in a well-behaved manner,the data requested will initially correspond to the first GOP in thefile. This means that the data can be returned as soon as the essencedata for that GOP only has been obtained, without the essence data forall GOPs needing to be available as in a conventional system.

The file system 31 will then receive requests for data from thesubsequent GOPs in turn, and will return the relevant data (steps 75 and76 repeated), with the file system 31 being able to return the data fora GOP as soon as the relevant essence data has been provided by thestream 31.

It will be appreciated that in the alternative embodiment in which theindex and GOP data are only generated when requested, the operation ofthe file system 31 would be adapted accordingly.

FIG. 8 shows the effect of the invention when used to create a file thatis then converted. Unlike with a conventional system, the conversion ofthe file can begin as soon as the essence data for the GOPs within thefile becomes available, rather than the conversion having to wait untilthe entire file to be available. Suppose segment S₁ consists of livefootage, the essence data for which is provided via the stream 37. Theconversion of this segment, as indicated by the bar C₁, can begin almostimmediately, and proceeds in “real time” as the essence data for segmentbecomes available. Consequently, the conversion of the segment finishesonly a short time after the segment itself has finished.

Further, suppose segments S₂ and S_(n) consist of pre-recorded footage.In this case, the conversion does not need to be performed in real time,as all essence data for the segment will already be available.Consequently, the conversion of the segments (as indicated by the barsC₂ and C_(n)) can be completed while the segments are still beingbroadcast (as there is no reason for the conversion to be performed inreal time); or if conversion of a previous segment was still in process,the reduced time for converting the segment can allow the conversionprocess to “catch up”.

It can be seen that the overall length of the conversion process C₁ toC_(n) in this example in fact takes longer than the conversion process Cin the conventional example. This is because the conversion can onlyoccur as the contents of the file is made available, which may be onlyin real time if live footage is included, rather than in theconventional example in which the entirety of the file is available whenthe conversion begins. However, as the conversion begins while the fileis still being created, the converted file is nevertheless available infull only shortly after the original file has been completed. The speedof the conversion is therefore not a disadvantage, and in fact isadvantageous as it means that there is no reason to use a large amountof computing power, with the attendant expense, in order to reduce thetime the conversion takes as much as possible.

It will be appreciated that if a pre-recorded segment is followed by alive footage segment, the essence data for the live footage segment maynot be available when the conversion of the pre-recorded segment hascompleted. This may result in the device 38 making a request for a GOPsubstantially in advance of the file system 11 being able to provide it.This can result in a request for a GOP timing out, i.e. the dataconstituting the GOP is not returned within the maximum time allowed. Toavoid this, the file system 31 can delay the return of earlier GOPs.This will in turn delay future requests made by the device 38, thusensuring (or trying to ensure) that the required essence data isreceived within a sufficiently small time from the request being made,so that such timeouts do not occur.

Whilst the present invention has been described and illustrated withreference to particular embodiments, it will be appreciated by those ofordinary skill in the art that the invention lends itself to manydifferent variations not specifically illustrated herein.

1. A file system for providing file data for a media file having apredetermined format, the file system comprising: a data store storingessence data; and a media manager configured to: determine thepredetermined format of the media file, which corresponds to a programcomprising a plurality of segments; determine a maximum segment lengthfor the program based on the predetermined format of the media file;determine, prior to an inclusion of at least a portion of the pluralityof segments in the program, a layout of the media file in thepredetermined format based on the maximum segment length, with thelayout defining at least one location for the essence data within themedia file; in response to a request for the at least one location ofthe essence data within the media file, return a location for theessence data defined by the determined layout of the media file; inresponse to an instruction that a respective segment is to be includedin the plurality of segments for the program, obtain the essence datafrom the data store that corresponds to contents of the respectivesegment; and return the essence data based on the determined layout ofthe media file in response to a request for a portion of the essencedata from the media file.
 2. The file system according to claim 1,wherein the media manager is configured to determine the predeterminedformat of the media file based on an index that provides a mapping oftime ranges for the plurality of segments for the program.
 3. The filesystem according to claim 1, wherein the predetermined format of themedia file defines the plurality of segments of the essence data locatedat pre-declared locations within the media file, and the media manageris configured to determine the layout of the media file based oncalculated locations of each segment of the media file to have themaximum segment length.
 4. The file system according to claim 1, whereinthe media manager is configured to delay the return of the essence datato vary a speed at which the file system provides the essence data. 5.The file system according to claim 1, wherein the media manager receivesan instruction that a segment is to be included in the program and isconfigured to obtain the essence data for the segment that is derivedfrom the received essence data by omitting, duplicating and/orinterpolating frames of the received essence data.
 6. The file systemaccording to claim 1, wherein the media manager is configured todetermine the layout of the media file based on time offsets and byteoffsets for frames of image data within the media file.
 7. A file systemfor providing file data for a media file having a predetermined format,the file system comprising: a data store storing essence data; and amedia manager configured to: determine the predetermined format of themedia file for a program that includes a plurality of segments;determine, prior to an inclusion of at least a portion of the pluralityof segments in the program, a layout of the media file in thepredetermined format that defines at least one location for the essencedata in the media file; in response to a request for the at least onelocation of the essence data, return a location for the essence datadefined by the determined layout of the media file; in response to aninstruction that a respective segment is to be included in the pluralityof segments for the program, obtain the essence data from the data storethat corresponds to the respective segment; and in response to a requestfor a portion of the essence data from the media file, return theessence data based on the determined layout of the media file.
 8. Thefile system according to claim 7, wherein the media manager isconfigured to determine a maximum segment length for the program basedon the predetermined format of the media file.
 9. The file systemaccording to claim 8, wherein the media manager is configured todetermine the layout of the media file in the predetermined format basedon the maximum segment length for the program.
 10. The file systemaccording to claim 7, wherein the media manager is configured todetermine the predetermined format of the media file based on an indexthat provides a mapping of time ranges for the plurality of segments forthe program.
 11. The file system according to claim 7, wherein thepredetermined format of the media file defines the plurality of segmentsof the essence data located at pre-declared locations within the mediafile, and the media manager is configured to determine the layout of themedia file based on calculated locations of each segment of the mediafile to have the maximum segment length.
 12. The file system accordingto claim 7, wherein the media manager is configured to delay the returnof the essence data to vary a speed at which the file system providesthe essence data.
 13. The file system according to claim 7, wherein themedia manager receives an instruction that a segment is to be includedin the program and is configured to obtain the essence data for thesegment that is derived from the received essence data by omitting,duplicating and/or interpolating frames of the received essence data.14. The file system according to claim 7, wherein the media manager isconfigured to determine the layout of the media file based on timeoffsets and byte offsets for frames of image data within the media file.15. A system for providing file data for a media file having apredetermined format, the system comprising: a file system configuredto: determine, based on an index that provides a mapping of time rangesfor a plurality of segments for a program, the predetermined format ofthe media file for the program that includes a plurality of segments;determine a layout of the media file in the predetermined format thatdefines at least one location for essence data in the media file; inresponse to a request for the at least one location of the essence data,return a location for the essence data to be included in the media fileand that is defined by the determined layout of the media file; inresponse to an instruction that a respective segment is to be includedin the plurality of segments for the program, obtain the essence datafrom the data store that corresponds to the respective segment; and inresponse to a request for a portion of the essence data from the mediafile, return the essence data based on the determined layout of themedia file.
 16. The file system according to claim 15, wherein the mediamanager is configured to determine a maximum segment length for theprogram based on the predetermined format of the media file.
 17. Thefile system according to claim 16, wherein the media manager isconfigured to determine the layout of the media file in thepredetermined format based on the maximum segment length for theprogram.
 18. The file system according to claim 15, wherein thepredetermined format of the media file defines the plurality of segmentsof the essence data located at pre-declared locations within the mediafile, and the media manager is configured to determine the layout of themedia file based on calculated locations of each segment of the mediafile to have the maximum segment length.
 19. The file system accordingto claim 15, wherein the media manager is configured to delay the returnof the essence data to vary a speed at which the file system providesthe essence data.
 20. The file system according to claim 15, wherein themedia manager receives an instruction that a segment is to be includedin the program and is configured to obtain the essence data for thesegment that is derived from the received essence data by omitting,duplicating and/or interpolating frames of the received essence data.21. The file system according to claim 15, wherein the media manager isconfigured to determine the layout of the media file based on timeoffsets and byte offsets for frames of image data within the media file.